package com.ly.common.utils.erp;

/**
 * 金蝶常量数据
 */
public class KingConstUtil {

    /**
     * 默认组织编码
     */
    public static final String DEFAULT_ORG = "100";


    /**
     * 是否已发送
     * 1、是
     * 2、否
     */
    public static final Integer KING_DATA_IS_SEND_YES = 1;
    public static final Integer KING_DATA_IS_SEND_NO = 2;


    /**
     * 金蝶财务，收款单/付款单明细表类型
     * 1：付款单；
     * 2：收款单；
     * 3：付款退款单；
     * 4：收款退款单
     */
    //财务模块，付款单类型
    //public static final Integer FINANCE_PAY_DETAIL_TYPE = 1;
    //财务模块，收款单类型
    //public static final Integer FINANCE_RECEIPT_DETAIL_TYPE = 2;
    //财务模块，付款退款单类型
    //public static final Integer FINANCE_PAY_REFUND_DETAIL_TYPE = 3;
    //收款退款单
    //public static final Integer FINANCE_RECEIPT_REFUND_DETAIL_TYPE = 4;


    /**
     * 金蝶，付款单type类型
     * 1：付款单
     * 2：付款退款单
     */
    //public static final Integer FINANCE_PAY_TYPE = 1;
    //public static final Integer FINANCE_PAY_REFUND_TYPE = 2;

    /**
     * 金蝶，收款单type类型
     * 1：收款单
     * 2：收款退款单
     */
    //public static final Integer FINANCE_RECEIPT_TYPE = 1;
    //public static final Integer FINANCE_RECEIPT_REFUND_TYPE = 2;


    /**
     * 采购退料类型
     * 1、退货退款
     * 2、退货补货
     */
    public static final Integer PROCURE_REFUND_TYPE_REFUND_PAY = 1;
    public static final Integer PROCURE_REFUND_TYPE_REFUND = 2;

    /**
     * 销售退货类型
     * 1：退货补货
     * 2：仅退款不退货
     * 3：退货
     */
    public static final Integer SALE_REFUND_TYPE_REFUND = 1;
    public static final Integer SALE_REFUND_TYPE_REFUND_PAY = 2;
    public static final Integer SALE_REFUND_TYPE_REFUND_DETAIL = 3;


    /**
     * 金蝶数据统一单据数据状态；
     * Z：暂存
     * A：创建
     * B：审核中
     * C：已审核
     * D：重新审核
     * E：已冲红
     */
    public static final String KING_DATA_EXAMINE_STATUS_STAGING = "Z";
    public static final String KING_DATA_EXAMINE_STATUS_CREATED = "A";
    public static final String KING_DATA_EXAMINE_STATUS_UNDER = "B";
    public static final String KING_DATA_EXAMINE_STATUS_APPROVED = "C";
    public static final String KING_DATA_EXAMINE_STATUS_RE_AUDIT = "D";
    public static final String KING_DATA_EXAMINE_STATUS_OFFSET = "E";


    /**
     * 金蝶财务，应付票据数据和结算状态
     */
    //财务模块，应付票据，数据状态，创建
    public static final Integer FINANCE_PAY_BILL_DATA_STATUS_CREATED = 1;
    //财务模块，应付票据，数据状态，审核中
    public static final Integer FINANCE_PAY_BILL_DATA_STATUS_UNDER = 2;
    //财务模块，应付票据，数据状态，已审核
    public static final Integer FINANCE_PAY_BILL_DATA_STATUS_APPROVED = 3;
    //财务模块，应付票据，结算状态，为空；到期付款；退票
    public static final Integer FINANCE_PAY_BILL_SETTLEMENT_STATUS_EMPTY = 1;
    public static final Integer FINANCE_PAY_BILL_SETTLEMENT_STATUS_PAY = 2;
    public static final Integer FINANCE_PAY_BILL_SETTLEMENT_STATUS_REFUND = 3;


    /**
     * 金蝶财务，应收票据结算状态
     * 为空；2：拆分；3：背书；4：背书退回；5：贴现；6：到期收款；7：退票；8：质押；9：撤押
     */
    //应收票据数据状态
    public static final Integer FINANCE_RECEIPT_BILL_DATA_STATUS_CREATED = 1;
    public static final Integer FINANCE_RECEIPT_BILL_DATA_STATUS_UNDER = 2;
    public static final Integer FINANCE_RECEIPT_BILL_DATA_STATUS_APPROVED = 3;
    //应收票据结算状态
    public static final Integer FINANCE_RECEIPT_BILL_SETTLEMENT_STATUS_EMPTY = 1;
    public static final Integer FINANCE_RECEIPT_BILL_SETTLEMENT_STATUS_SPILT = 2;
    public static final Integer FINANCE_RECEIPT_BILL_SETTLEMENT_STATUS_RECITE = 3;
    public static final Integer FINANCE_RECEIPT_BILL_SETTLEMENT_STATUS_RECITE_REFUND = 4;
    public static final Integer FINANCE_RECEIPT_BILL_SETTLEMENT_STATUS_DISCOUNT = 5;
    public static final Integer FINANCE_RECEIPT_BILL_SETTLEMENT_STATUS_DUE_RECEIPT = 6;
    public static final Integer FINANCE_RECEIPT_BILL_SETTLEMENT_STATUS_REFUND = 7;
    public static final Integer FINANCE_RECEIPT_BILL_SETTLEMENT_STATUS_PLEDGE = 8;
    public static final Integer FINANCE_RECEIPT_BILL_SETTLEMENT_STATUS_UN_PLEDGE = 9;


    /**
     * 应收票据背书类型
     * 4、转收款退款：暂时不能选择
     * 1、转预付款：付款单（付款用途：预付款）
     * 5、冲减预收款：暂时不能选择
     * 2、冲减应付款：付款单（付款用途：采购付款）
     * 3、转其他应收款：其他应收单
     */
    public static final Integer FINANCE_RECEIPT_BILL_RECITE_TYPE_TO_ADVANCE_CHARGE = 1;
    public static final Integer FINANCE_RECEIPT_BILL_RECITE_TYPE_OFFSET_PAYABLE = 2;
    public static final Integer FINANCE_RECEIPT_BILL_RECITE_TYPE_OTHER_RECEIPT = 3;
    public static final Integer FINANCE_RECEIPT_BILL_RECITE_TYPE_TO_RECEIPT_REFUND = 4;
    public static final Integer FINANCE_RECEIPT_BILL_RECITE_TYPE_OFFSET_ADVANCE_PAYMENT = 5;


    /**
     * 其他应收单，来源系统
     * 1、手工新增
     * 2、应收票据背书
     * 3、应收票据背书退回
     */
    public static final Integer OTHER_RECEIPT_BILL_SOURCE_TYPE_ADD = 1;
    public static final Integer OTHER_RECEIPT_BILL_SOURCE_TYPE_RECITE = 2;
    public static final Integer OTHER_RECEIPT_BILL_SOURCE_TYPE_RECITE_REFUND = 3;


    /**
     * ------------------------------
     * 应付单：源单类型
     * 1、手动新增应付单
     * 2、采购订单下推
     * 3、采购入库单下推
     * 4、采购退料单
     * 5、应付单下推，冲红
     */
    public static final Integer PAYABLE_SOURCE_DOC_TYPE_ADD = 1;
    public static final Integer PAYABLE_SOURCE_DOC_TYPE_ORDER = 2;
    public static final Integer PAYABLE_SOURCE_DOC_TYPE_IN_STORAGE = 3;
    public static final Integer PAYABLE_SOURCE_DOC_TYPE_REFUND = 4;
    public static final Integer PAYABLE_SOURCE_DOC_TYPE_PAYABLE = 5;


    /**
     * 应付单（立账）类型：
     * 2:暂估应付;
     * 3:财务应付
     */
    public static final String ACCOUNT_TYPE_TEM = "2";
    public static final String ACCOUNT_TYPE_MEET = "3";
    /**
     * 应付单/应收单新增界面，是否先到票
     * 1、是
     * 2、否
     */
    public static final Boolean IS_TICKETS_BEFORE_YES = true;
    public static final Boolean IS_TICKETS_BEFORE_NO = false;
    /**
     * 应付单/应收单新增界面，税额计入成本
     * 1、是
     * 2、否
     */
    public static final String TAX_COST_AMOUNT_YES = "1";
    public static final String TAX_COST_AMOUNT_NO = "2";
    /**
     * 应付单/应收单新增界面明细行，计入采购成本
     * 1、是
     * 2、否
     */
    public static final Integer INCLUDE_PROCURE_COST_YES = 1;
    public static final Integer INCLUDE_PROCURE_COST_NO = 2;
    /**
     * 应付单/应收单新增界面明细行，计入合同履约成本
     * 1、是
     * 2、否
     */
    public static final Integer INCLUDE_CONTRACT_COST_YES = 1;
    public static final Integer INCLUDE_CONTRACT_COST_NO = 2;


    /**
     * 应收单：源单类型
     * 1、手动新增应收单
     * 2、销售订单下推
     * 3、销售出库单
     * 4、销售退货单
     * 5、冲红
     */
    public static final Integer RECEIVABLE_SOURCE_DOC_TYPE_ADD = 1;
    public static final Integer RECEIVABLE_SOURCE_DOC_TYPE_ORDER = 2;
    public static final Integer RECEIVABLE_SOURCE_DOC_TYPE_OUT_STORAGE = 3;
    public static final Integer RECEIVABLE_SOURCE_DOC_TYPE_REFUND = 4;
    public static final Integer RECEIVABLE_SOURCE_DOC_TYPE_PAYABLE = 5;


    /**
     * 应收单、应付单的收付款条件type
     * 收款条件：type
     * 1、应收单
     * 2、应付单
     */
    public static final Integer BASE_RECEIPT_PAY_CONDITION_RECEIPT_STATUS = 1;
    public static final Integer BASE_RECEIPT_PAY_CONDITION_PAY_STATUS = 2;


    /**
     * 核销单类型
     * 1、应收收款核销记录
     * 2、应付付款核销记录
     */
    public static final Integer VERIFY_RECORDS_PAYABLE = 1;
    public static final Integer VERIFY_RECORDS_RECEIVABLE = 2;


    /**
     * 付款单源单类型：
     * 1、手动新增
     * 2、应付单下推付款单
     * 3、其他应付单下推付款单
     * 4、工程下推付款单
     * 5、应付票据审核后自动生成
     * 6、应收票据背书后生成
     */
    public static final Integer PAY_TYPE_ADD = 1;
    public static final Integer PAY_TYPE_PAYABLE = 2;
    public static final Integer PAY_TYPE_OTHER_PAYABLE = 3;
    public static final Integer PAY_TYPE_PROJECT = 4;
    public static final Integer PAY_TYPE_PAY_BILL = 5;
    public static final Integer PAY_TYPE_RECEIPT_BILL = 6;

    /**
     * 付款退款单源单类型：
     * 1、手动新增
     * 2、付款单下推
     * 3、应付票据退票
     */
    public static final Integer PAY_REFUND_TYPE_ADD = 1;
    public static final Integer PAY_REFUND_TYPE_PAY = 2;
    public static final Integer PAY_REFUND_TYPE_PAY_BILL_REFUND = 3;

    /**
     * 收款单源单类型
     * 1、手动新增
     * 2、应收单下推收款单
     * 3、其他应收单下推收款单
     * 4、应付票据自动生成收款单(银行转账单，到期自动生成)
     * 5、应收票据新增审核后，生成收款单
     * 6、工程下推收款单
     */
    public static final Integer RECEIPT_TYPE_ADD = 1;
    public static final Integer RECEIPT_TYPE_RECEIVABLE = 2;
    public static final Integer RECEIPT_TYPE_OTHER_RECEIVABLE = 3;
    public static final Integer RECEIPT_TYPE_PAY_BILL = 4;
    public static final Integer RECEIPT_TYPE_RECEIPT_BILL = 5;
    public static final Integer RECEIPT_TYPE_PROJECT = 6;

    /**
     * 收款退款单源单类型：
     * 1、手动新增
     * 2、收款单下推
     */
    public static final Integer RECEIPT_REFUND_TYPE_ADD = 1;
    public static final Integer RECEIPT_REFUND_TYPE_PAY = 2;


    /**
     * 差异日志
     */
    public static final String AMOUNT_CURRENCY = "金额(本位币)";


    /**
     * 仓库-组装与拆卸：事务类型：
     * Assembly：组装;
     * Dassembly：拆卸
     */
    public static final String TRANSACTION_TYPE_ASSEMBLE = "Assembly";
    public static final String TRANSACTION_TYPE_DISASSEMBLE = "Dassembly";


    /*******************************************************************************************************************
     *
     * 金蝶单据类型：
     *
     */
    //收款单：其他业务收款单
    public static final String RECEIPT_OTHER_RECEIPT = "SKDLX02_SYS";
    //收款单：销售收款单
    public static final String RECEIPT_SALE_RECEIPT = "SKDLX01_SYS";
    //收款退款单：销售业务退款单
    public static final String RECEIPT_REFUND_SXTK = "SKTKDLX01_SYS";
    //付款单：采购业务付款单
    public static final String PAY_PURCHASE_PAY = "FKDLX01_SYS";
    //盘盈单
    public static final String KING_DOC_TYPE_PROFIT = "STK_StockCountGain";
    //盘亏单
    public static final String KING_DOC_TYPE_LOSS = "STK_StockCountLoss";
    //入库成本调整单
    public static final String KING_INVENTORY_COST = "CGRKTZD01_SYS";
    //出库成本调整单
    public static final String KING_OUT_INVENTORY_COST = "CKCBTZD01_SYS";
    //标准应付单
    public static final String KING_PAYABLE_STAND = "YFD01_SYS";
    //费用应付单
    public static final String KING_PAYABLE_FEE = "YFD02_SYS";
    //应付票据结算单：应付票据到期付款
    public static final String KING_PAY_BILL_PAYMENT = "BPJS01_SYS";
    //应付票据结算单：应付票据退票
    public static final String KING_PAY_BILL_REFUND = "BPJS02_SYS";
    //应收票据结算单：应收票据背书
    public static final String KING_RECEIPT_BILL_BS = "BRJS03_SYS";
    //应收票据结算单：应收票据背书退回
    public static final String KING_RECEIPT_BILL_BSTH = "BRJS04_SYS";
    //应收票据结算单：应收票据到期收款
    public static final String KING_RECEIPT_BILL_DQSK = "BRJS01_SYS";
    //应收票据结算单：应收票据退票
    public static final String KING_RECEIPT_BILL_REFUND = "BRJS05_SYS";
    //应收票据结算单：应收票据质押结算单
    public static final String KING_RECEIPT_BILL_PLEDGE = "BRJS06_SYS";
    //应收票据结算单：应收票据撤押结算单
    public static final String KING_RECEIPT_BILL_UNPLEDGE = "BRJS07_SYS";
    //付款退款单：采购业务退款单
    public static final String PAY_REFUND_PUR_REFUND = "FKTKDLX01_SYS";
    //付款退款单
    public static final String KING_PAY_REFUND = "AP_REFUNDBILL";
    //其他应付单
    public static final String KING_OTHER_PAYABLE = "QTYFD01_SYS";
    //标准应收单
    public static final String KING_STAND_RECEIVABLE = "YSD01_SYS";
    //其他应收单
    public static final String KING_OTHER_RECEIVABLE = "QTYSD01_SYS";


    /*******************************************************************************************************************
     * 金蝶：结算方式、收款用途
     */
    //结算方式：电汇
    public static final String SETT_TYPE_DH = "JSFS04_SYS";
    //结算方式：银行承兑汇票
    public static final String SETT_TYPE_YHCDHP = "JSFS07_SYS";
    //结算方式：票据退票
    public static final String SETT_TYPE_PJTP = "JSFS12_SYS";
    //结算方式：应收票据背书
    public static final String SETT_TYPE_PJBS = "JSFS09_SYS";
    //收款用途：利息收入
    public static final String PURPOSE_INTEREST = "SFKYT03_SYS";
    //付款用途：预付款
    public static final String PURPOSE_YFK = "SFKYT09_SYS";
    //付款用途：采购付款
    public static final String PURPOSE_PUR_PAY = "SFKYT08_SYS";
    //付款用途：预收款
    public static final String PURPOSE_YSK = "SFKYT02_SYS";
    //付款用途：销售收款
    public static final String PURPOSE_SALE_RECEIPT = "SFKYT01_SYS";


    /*******************************************************************************************************************
     *
     * 推送金蝶所需的formId，来自于金蝶API文档业务对象表单Id
     * 实际开发过程中，需要借助于API参考：
     * @see https://openapi.open.kingdee.com/ApiDoc
     *
     */
    //币别
    public static final String BD_CURRENCY = "BD_Currency";
    //结算方式
    public static final String BD_SETTLETYPE = "BD_SETTLETYPE";
    //收付款用途
    public static final String CN_RECPAYPURPOSE = "CN_RECPAYPURPOSE";
    //汇率体系
    public static final String BD_Rate = "BD_Rate";
    //费用项目
    public static final String BD_Expense = "BD_Expense";
    //税率
    public static final String BD_TaxRate = "BD_TaxRate";
    //其他往来单位
    public static final String FIN_OTHERS = "FIN_OTHERS";
    //烈阳内部银行账号
    public static final String CN_BANKACNT = "CN_BANKACNT";
    //基础银行信息
    public static final String BD_BANK = "BD_BANK";
    //安全库存设置
    public static final String BD_SAFESTOCKBILL = "BD_SAFESTOCKBILL";
    //计量单位
    public static final String BD_UNIT = "BD_UNIT";
    //成本中心
    public static final String CB_COSTCENTER = "CB_COSTCENTER";
    //部门
    public static final String BD_Department = "BD_Department";
    //员工
    public static final String BD_Empinfo = "BD_Empinfo";
    //单据类型
    public static final String BOS_BillType = "BOS_BillType";
    //供应商
    public static final String BD_Supplier = "BD_Supplier";
    //采购订单
    public static final String PUR_PurchaseOrder = "PUR_PurchaseOrder";
    //物料
    public static final String BD_MATERIAL = "BD_MATERIAL";
    //采购开票(应付单)
    public static final String AP_Payable = "AP_Payable";
    //销售开票(应收单)
    public static final String AR_receivable = "AR_receivable";
    //付款单
    public static final String AP_PAYBILL = "AP_PAYBILL";
    //收款单
    public static final String AR_RECEIVEBILL = "AR_RECEIVEBILL";
    //其他应付单
    public static final String AP_OtherPayable = "AP_OtherPayable";
    //其他应收单
    public static final String AR_OtherRecAble = "AR_OtherRecAble";
    //银行转账单
    public static final String CN_BANKTRANSBILL = "CN_BANKTRANSBILL";
    //采购入库单
    public static final String STK_InStock = "STK_InStock";
    //采购退料单
    public static final String PUR_MRB = "PUR_MRB";
    //其他入库单
    public static final String STK_MISCELLANEOUS = "STK_MISCELLANEOUS";
    //付款退款单
    public static final String AP_REFUNDBILL = "AP_REFUNDBILL";
    //收款退款单
    public static final String AR_REFUNDBILL = "AR_REFUNDBILL";
    //收料通知单
    public static final String PUR_RECEIVEBILL = "PUR_ReceiveBill";
    //检验单
    public static final String QM_INSPECTBILL = "QM_InspectBill";
    //不良品处理单
    public static final String QM_DEFECTPROCESSBILL = "QM_DefectProcessBill";
    //基础数据：采购条款
    public static final String BD_PURCLAUSE = "BD_PURCLAUSE";
    //基础数据：采购条款
    public static final String BD_SALCLAUSE = "BD_SALCLAUSE";
    //销售订单
    public static final String SAL_SaleOrder = "SAL_SaleOrder";
    //销售出库单
    public static final String SAL_OUTSTOCK = "SAL_OUTSTOCK";
    //销售退货单
    public static final String SAL_RETURNSTOCK = "SAL_RETURNSTOCK";
    //业务组
    public static final String BD_OPERATORGROUPBILL = "BD_OPERATORGROUPBILL";
    //仓库
    public static final String BD_STOCK = "BD_STOCK";
    //库存状态
    public static final String BD_StockStatus = "BD_StockStatus";
    //客户
    public static final String BD_Customer = "BD_Customer";
    //联系人
    public static final String BD_CommonContact = "BD_CommonContact";
    //税收制度
    public static final String BD_TAXSYSTEM = "BD_TAXSYSTEM";
    //税种
    public static final String BD_TAXTYPE = "BD_TAXTYPE";

}
